<template>
	<view class="container">
		<div class="make-an-appointment">
			<!-- <view style="font-size: 36rpx; font-weight: 600; margin-top: 30rpx">精选医生</view> -->
			<view class="list-content">
				<view class="content-box" v-for="item in winnowList" :key="item.doctorId"
					@click="winnowListClick(item)">
					<view class="img-box">
						<img :src="item.image?item.image:baseURL+'/static/error.png'" alt="" />
					</view>
					<view class="right-content-box">
						<view class="h-title">{{item.doctorName}} <text
								style="font-size: 24rpx;margin-left: 10rpx;color:#95989D;">{{item.departmentName}}</text>
						</view>
						<view class="p-text">
							<view> 好评：<text style="color:#FE8C22;margin-right: 60rpx;">{{item.esteemRate*100}}%</text>
							</view>
							<view>接诊人次：<text style="color:#FE8C22">{{item.receptionNum}}人</text></view>
						</view>
					</view>
				</view>
			</view>
		</div>
	</view>
</template>

<script>
	import {
		winnowDoctor
	} from "@/api/axios/PhysicianManagement.js";
	export default {
		data() {
			return {
				followList: [],
				winnowList: [],
				show: false,
				columns: [],
				baseURL: this.staticURL
			};
		},
		created: async function() {
			let openId = uni.getStorageSync("openId")

			let winnowList = await winnowDoctor({
				params: {
					openId,
					pageNo: 1,
					pageSize: 4
				}
			})
			this.winnowList = winnowList.records

		},
		methods: {
			branchCourtListClick(data) {
				console.log(data, 'data');
				uni.navigateTo({
					url: "/pages-makeAnAppointmentCenter/BranchCourtDetail/index?doctorId=" +
						data.userId + '&storeId=' + data.departmentId,
				})
			},
			winnowListClick(data) {
				uni.navigateTo({
					url: "/pages-makeAnAppointmentCenter/BranchCourtDetail/index?doctorId=" +
						data.doctorId + '&storeId=' + data.departmentId,
				})
			}
		},
	};
</script>

<style lang="scss">
	@import "index.scss";
</style>